<template>
	<div class="p_20 indexBanner">
		<el-dialog :visible.sync="isShow"  :close-on-click-modal="false" @close="closeDialog">
			
			<h3 class="text_center title1">报告者信息</h3>
			
			<el-form label-width="80px" label-position="rigth">
				<el-row>
					<el-col :span="8">
						<el-form-item label="姓名:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.name}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="姓氏:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.last_name}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="性别:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.sex}}</span>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-form-item label="联系信息:" label-width="80px">
						<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
						<span class="bck">{{form.contact}}</span>
					</el-form-item>
				</el-row>
				<el-row>
					<el-form-item label="传真:" label-width="80px">
						<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
						<span class="bck">{{form.fox}}</span>
					</el-form-item>
				</el-row>
				<el-row>
					<el-form-item label="地址:" label-width="80px">
						<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
						<span class="bck">{{form.address}}</span>
					</el-form-item>
				</el-row>
				<el-row>
					<el-col :span="8">
						<el-form-item label="城市:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.city}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="邮编:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.code}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="国家:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.country}}</span>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-form-item label="愿意接受跟进随访:" label-width="130px">
						<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
						<span class="bck">{{form.is_want}}</span>
					</el-form-item>
				</el-row>
				
				<el-row>
					<el-col :span="12">
						<el-form-item label="医生姓名:">
							<span class="bck">{{form.doctor_name}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="医院:">
							<span class="bck">{{form.hospital}}</span>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-col :span="12">
						<el-form-item label="科室:">
							<span class="bck">{{form.department}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="联系电话:">
							<span class="bck">{{form.hospital_phone}}</span>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-form-item label="邮箱:">
						<span class="bck">{{form.is_want}}</span>
					</el-form-item>
				</el-row>
				
				
				<h3 class="text_center title1">患者信息</h3>
				
				<el-row>
					<el-col :span="8">
						<el-form-item label="姓名:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.patient_name}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="姓氏:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.patient_last_name}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="8">
						<el-form-item label="性别:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.patient_sex}}</span>
						</el-form-item>
					</el-col>
				</el-row>
				<el-row>
					<el-col :span="12">
						<el-form-item label="体重:">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.patient_weight}}</span>
						</el-form-item>
					</el-col>
					<el-col :span="12">
						<el-form-item label="出生年月:" label-width="80px">
							<!-- <el-input v-model="form.name" class="w_250"></el-input> -->
							<span class="bck">{{form.patient_birthday}}</span>
						</el-form-item>
					</el-col>
				</el-row>
				
				
				<h3 class="text_center title1">不良事件</h3>
				
				<el-table :data='tableData' width='100%'>
					<el-table-column label='不良事件' prop='TypeText'></el-table-column>
					<el-table-column label='不良事件开始日期' prop='created_at'>
						<template slot-scope="scope">
							{{scope.row.created_at}}
						</template>
					</el-table-column>
					<el-table-column label='不良事件结束日期' prop='created_at'>
						<template slot-scope="scope">
							{{scope.row.created_at}}
						</template>
					</el-table-column>
					<el-table-column label='事件结局' prop='TypeText'></el-table-column>
				</el-table>
				
				
				<h3 class="text_center title1">产品信息</h3>
				
				<el-table :data='tableData' width='100%'>
					<el-table-column label='产品名称' prop='TypeText'></el-table-column>
					<el-table-column label='适应症' prop='TypeText'></el-table-column>
					<el-table-column label='使用剂量' prop='TypeText'></el-table-column>
					<el-table-column label='使用频率' prop='TypeText'></el-table-column>
					<el-table-column label='批号' prop='TypeText'></el-table-column>
					<el-table-column label='用药起始日期' prop='created_at'>
						<template slot-scope="scope">
							{{scope.row.created_at}}
						</template>
					</el-table-column>
					<el-table-column label='停药日期' prop='created_at'>
						<template slot-scope="scope">
							{{scope.row.created_at}}
						</template>
					</el-table-column>
					<el-table-column label='产品类型' prop='TypeText'></el-table-column>
				</el-table>
				
				
				<h3 class="text_center title1">附加信息</h3>
				
				
				<!-- <el-row> -->
					<el-form-item label="" label-width="0px">
						<el-input v-model="form.name" :rows="5" type="textarea" disabled></el-input>
						<!-- <span class="bck">{{form.name}}</span> -->
					</el-form-item>
				<!-- </el-row> -->
				
			</el-form>
			<span slot="footer" class="dialog-footer">
				<el-button @click="closeDialog">关 闭</el-button>
				<!-- <el-button type="primary" @click="submit">确 定</el-button> -->
			</span>
		</el-dialog>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				isShow: false,
				form: {
					banner_id:'',
					banner_title:'',
					image_id:'',
					url:'',
					sort:0,
					language:'cn'
				},

				//图片上传
				imageUrl: '',
				// dialogVisible: false,
				// disabled: false
			}
		},
		methods: {
			//提交
			submit(){
				
				let params = this.form;
				params.language = this.$store.getters.getLanguage
				console.log(params);
				if(this.form.id) {
					this.edit(params);
				}else {
					this.add(params);
				}
			},
			
			getDetail(id){
				let params = {id:id}
				this.axiosGets('Report/reportShow',params , res => {
					console.log(res);
					if(res.data.code == 0) {
						this.form = res.data.data[0];
					}
				})
			},


			
			
			//关闭窗口 清空数据
			closeDialog(){
				this.form = {
					
				}
				this.imageUrl = ''
				this.isShow = false;
			}
		}
	}
</script>

<style scoped>
	.title1 {
		background-color: #009688;
		color:#fff;
		padding: 6px 0;
	}
	
	.bck {
		background-color: #eee;
		display: inline-block;
		padding: 0px 10px;
		min-width: 70%;
		box-sizing: border-box;
		border-radius: 3px;
	}
</style>
